Optimal. Leaf size=54 \[ \frac {a \, _2F_1(1,1+n p;2+n p;i \tan (e+f x)) \tan (e+f x) \left (c (d \tan (e+f x))^p\right )^n}{f (1+n p)} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.05, antiderivative size = 54, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 3, integrand size = 28, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.107, Rules used = {12, 1970, 66}
\begin {gather*} \frac {a \tan (e+f x) \, _2F_1(1,n p+1;n p+2;i \tan (e+f x)) \left (c (d \tan (e+f x))^p\right )^n}{f (n p+1)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 66
Rule 1970
Rubi steps
\begin {align*} \int \left (c (d \tan (e+f x))^p\right )^n (a+i a \tan (e+f x)) \, dx &=\frac {i \text {Subst}\left (\int \frac {a \left (c (d x)^p\right )^n}{i+x} \, dx,x,\tan (e+f x)\right )}{f}\\ &=\frac {(i a) \text {Subst}\left (\int \frac {\left (c (d x)^p\right )^n}{i+x} \, dx,x,\tan (e+f x)\right )}{f}\\ &=\frac {\left (i a (d \tan (e+f x))^{-n p} \left (c (d \tan (e+f x))^p\right )^n\right ) \text {Subst}\left (\int \frac {(d x)^{n p}}{i+x} \, dx,x,\tan (e+f x)\right )}{f}\\ &=\frac {a \, _2F_1(1,1+n p;2+n p;i \tan (e+f x)) \tan (e+f x) \left (c (d \tan (e+f x))^p\right )^n}{f (1+n p)}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] Both result and optimal contain complex but leaf count is larger than twice
the leaf count of optimal. \(173\) vs. \(2(54)=108\).
time = 0.91, size = 173, normalized size = 3.20 \begin {gather*} \frac {2^{-1-n p} a e^{-i e} \left (-\frac {i \left (-1+e^{2 i (e+f x)}\right )}{1+e^{2 i (e+f x)}}\right )^{1+n p} \left (1+e^{2 i (e+f x)}\right )^{1+n p} \cos (e+f x) \, _2F_1\left (1+n p,1+n p;2+n p;\frac {1}{2} \left (1-e^{2 i (e+f x)}\right )\right ) (\cos (f x)-i \sin (f x)) (1+i \tan (e+f x)) \tan ^{-n p}(e+f x) \left (c (d \tan (e+f x))^p\right )^n}{f+f n p} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [F]
time = 0.12, size = 0, normalized size = 0.00 \[\int \left (c \left (d \tan \left (f x +e \right )\right )^{p}\right )^{n} \left (a +i a \tan \left (f x +e \right )\right )\, dx\]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} i a \left (\int \left (- i \left (c \left (d \tan {\left (e + f x \right )}\right )^{p}\right )^{n}\right )\, dx + \int \left (c \left (d \tan {\left (e + f x \right )}\right )^{p}\right )^{n} \tan {\left (e + f x \right )}\, dx\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.02 \begin {gather*} \int {\left (c\,{\left (d\,\mathrm {tan}\left (e+f\,x\right )\right )}^p\right )}^n\,\left (a+a\,\mathrm {tan}\left (e+f\,x\right )\,1{}\mathrm {i}\right ) \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________